#include <stdio.h>
#include <common/Mutex.h>
#include "properties.h"

namespace {
Properties props = {0};
Mutex mutex;
}

PropAccessor::PropAccessor() {
	if (!mutex.lock(1000))
		printf("PropAccessor::PropAccessor() timeout\n");
}

PropAccessor::~PropAccessor() {
	mutex.unlock();
}

Properties & PropAccessor::operator()() {
	return props;
}
